﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Community.CsharpSqlite
{
    class ExprFlag
    {
        /*
 ** The following are the meanings of bits in the Expr.flags field.
 */
        //#define ExprFlag.EP_FromJoin   0x0001  /* Originated in ON or USING clause of a join */
        //#define ExprFlag.EP_Agg        0x0002  /* Contains one or more aggregate functions */
        //#define ExprFlag.EP_Resolved   0x0004  /* IDs have been resolved to COLUMNs */
        //#define ExprFlag.EP_Error      0x0008  /* Expression contains one or more errors */
        //#define ExprFlag.EP_Distinct   0x0010  /* Aggregate function with DISTINCT keyword */
        //#define ExprFlag.EP_VarSelect  0x0020  /* pSelect is correlated, not constant */
        //#define ExprFlag.EP_DblQuoted  0x0040  /* token.z was originally in "..." */
        //#define ExprFlag.EP_InfixFunc  0x0080  /* True for an infix function: LIKE, GLOB, etc */
        //#define ExprFlag.EP_ExpCollate 0x0100  /* Collating sequence specified explicitly */
        //#define ExprFlag.EP_FixedDest  0x0200  /* Result needed in a specific register */
        //#define ExprFlag.EP_IntValue   0x0400  /* Integer value contained in u.iValue */
        //#define ExprFlag.EP_xIsSelect  0x0800  /* x.pSelect is valid (otherwise x.pList is) */

        //#define EP_Reduced    0x1000  /* Expr struct is Const.EXPR_REDUCEDSIZE bytes only */
        //#define EP_TokenOnly  0x2000  /* Expr struct is Const.EXPR_TOKENONLYSIZE bytes only */
        //#define ExprFlag.EP_Static     0x4000  /* Held in memory not obtained from malloc() */

        public const ushort EP_FromJoin = 0x0001;
        public const ushort EP_Agg = 0x0002;
        public const ushort EP_Resolved = 0x0004;
        public const ushort EP_Error = 0x0008;
        public const ushort EP_Distinct = 0x0010;
        public const ushort EP_VarSelect = 0x0020;
        public const ushort EP_DblQuoted = 0x0040;
        public const ushort EP_InfixFunc = 0x0080;
        public const ushort EP_ExpCollate = 0x0100;
        public const ushort EP_FixedDest = 0x0200;
        public const ushort EP_IntValue = 0x0400;
        public const ushort EP_xIsSelect = 0x0800;
        public const ushort EP_Reduced = 0x1000;
        public const ushort EP_TokenOnly = 0x2000;
        public const ushort EP_Static = 0x4000;
    }
}
